package com.hao.mapper;
import com.hao.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Component
public interface UserMapper {
    //@Select("select * from student")
    List<User> SelectAll();
    //@Select("select id from student where id=#{id}")
    int SelectId(int id);
    //@Delete("DELETE FROM student where id = #{id}")
    int delete(int id);
    //@Insert("insert into student(name,age,hobby)values(#{name},#{age},#{hobby})")
    int add(User student);
    //@Update("UPDATE student SET name=#{name},age=#{age},hobby=#{hobby}" )
    int update(User student);
}